<?php

namespace App\Repository\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Prettus\Repository\Contracts\Transformable;
use Prettus\Repository\Traits\TransformableTrait;

/**
 * Class ProductBrands.
 *
 * @package namespace App\Repository\Models;
 */
class ProductBrands extends Model implements Transformable
{
    use TransformableTrait;
    use SoftDeletes;
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = ['name','initial','business_code','shop_id','pic','logo','describe','service_index','well_level','area','banner_pic','copy_category','sort'];

    public  function categories(){
        return $this->belongsToMany(ProductCategories::class,'category_brand','brand_id','category_id');
    }
}
